#pragma once

#include "google/protobuf/service.h"
#include "google/protobuf/descriptor.h"
#include "google/protobuf/message.h"
#include "google/protobuf/stubs/callback.h"
#include "rpcheader.pb.h"
#include "jsonUtils.h"
#include "mrpcapplication.h"


class MRpcChanner : public google::protobuf::RpcChannel
{
private:
    rpc::RpcHeader header;

   
    
public:
    void CallMethod(const google::protobuf::MethodDescriptor* method,
                          google::protobuf::RpcController* controller,
                            const google::protobuf::Message* request,
                          google::protobuf::Message* response, google::protobuf::Closure* done);
    void CallMethodJson(const std::string& serviceName,
                        const std::string& methodName,
                        RpcJsonParam jsonParam);
    std::string send(const std::string&);
    
};


